/**
 * "Visual Paradigm: DO NOT MODIFY THIS FILE!"
 * 
 * This is an automatic generated file. It will be regenerated every time 
 * you generate persistence class.
 * 
 * Modifying its content may cause the program not work, or your work may lost.
 */

/**
 * Licensee: nu uc
 * License Type: Evaluation
 */
package org.testis.orm.classes;

import org.orm.*;

public class T_dmap_languages {
    public T_dmap_languages() {
    }

    public boolean save() throws PersistentException {
	try {
	    org.testis.orm.manager.TestisDbPersistentManager.instance()
		    .saveObject(this);
	    return true;
	} catch (Exception e) {
	    e.printStackTrace();
	    throw new PersistentException(e);
	}
    }

    public boolean delete() throws PersistentException {
	try {
	    org.testis.orm.manager.TestisDbPersistentManager.instance()
		    .deleteObject(this);
	    return true;
	} catch (Exception e) {
	    e.printStackTrace();
	    throw new PersistentException(e);
	}
    }

    public boolean refresh() throws PersistentException {
	try {
	    org.testis.orm.manager.TestisDbPersistentManager.instance()
		    .getSession().refresh(this);
	    return true;
	} catch (Exception e) {
	    e.printStackTrace();
	    throw new PersistentException(e);
	}
    }

    public boolean evict() throws PersistentException {
	try {
	    org.testis.orm.manager.TestisDbPersistentManager.instance()
		    .getSession().evict(this);
	    return true;
	} catch (Exception e) {
	    e.printStackTrace();
	    throw new PersistentException(e);
	}
    }

    private int id;

    private String name;

    private Integer deviceAbstractionId;

    private Integer deviceId;

    private Integer firmwareId;

    private String file;

    private void setId(int value) {
	this.id = value;
    }

    public int getId() {
	return id;
    }

    public int getORMID() {
	return getId();
    }

    public void setName(String value) {
	this.name = value;
    }

    public String getName() {
	return name;
    }

    public void setDeviceAbstractionId(int value) {
	setDeviceAbstractionId(new Integer(value));
    }

    public void setDeviceAbstractionId(Integer value) {
	this.deviceAbstractionId = value;
    }

    public Integer getDeviceAbstractionId() {
	return deviceAbstractionId;
    }

    public void setDeviceId(int value) {
	setDeviceId(new Integer(value));
    }

    public void setDeviceId(Integer value) {
	this.deviceId = value;
    }

    public Integer getDeviceId() {
	return deviceId;
    }

    public void setFirmwareId(int value) {
	setFirmwareId(new Integer(value));
    }

    public void setFirmwareId(Integer value) {
	this.firmwareId = value;
    }

    public Integer getFirmwareId() {
	return firmwareId;
    }

    public void setFile(String value) {
	this.file = value;
    }

    public String getFile() {
	return file;
    }

    public String toString() {
	return toString(false);
    }

    public String toString(boolean idOnly) {
	if (idOnly) {
	    return String.valueOf(getId());
	} else {
	    StringBuffer sb = new StringBuffer();
	    sb.append("T_dmap_languages[ ");
	    sb.append("Id=").append(getId()).append(" ");
	    sb.append("Name=").append(getName()).append(" ");
	    sb.append("DeviceAbstractionId=").append(getDeviceAbstractionId())
		    .append(" ");
	    sb.append("DeviceId=").append(getDeviceId()).append(" ");
	    sb.append("FirmwareId=").append(getFirmwareId()).append(" ");
	    sb.append("File=").append(getFile()).append(" ");
	    sb.append("]");
	    return sb.toString();
	}
    }

}
